﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace Atributes
{
    class Program
    {
        static void Main(string[] args)
        {
            Type type = typeof(VersionAttribute);
            Type methodType = typeof(MethodsForAttributes);
            // Extracting all attributes of the class
            MethodInfo[] method = methodType.GetMethods();

            foreach (var met in method)
            {
                 VersionAttribute[] attributes = (VersionAttribute[])met.GetCustomAttributes(type, false);
                foreach (VersionAttribute attribute in attributes)
                {
                    Console.WriteLine("version "+attribute.VersionName+" - "+attribute.Comment );
                }
            }


        }
    }
}
